
/**
 * Holds definitions for interacting with the assembler stuff.
 */

#include <config.h>
#include <sw_types.h>

/* SSE data types */

typedef struct _sw_xmm_vec {

  double x; // Low 64 bits of the XMM register
  double y; // High 64 bits of the register.

} sw_xmm_vec __attribute__((aligned (16)));

/* Functions implemented in assembler. */

void   _sw_distance(sw_xmm_vec *, sw_xmm_vec *, double *);
void   _sw_vec_add(sw_xmm_vec *, sw_xmm_vec *);
//void   _sw_vec_sub(sw_xmm_vec *, sw_xmm_vec *);
void   _sw_vec_scale(sw_xmm_vec *, double *);

/* Other functions related to the assembler but not implemented in assembler */
double _sw_vec_dot(sw_xmm_vec *, sw_xmm_vec *);
void    sw_print_vec(sw_xmm_vec *);
void    sw_println_vec(sw_xmm_vec *);
